package com.xdf.wxbebarrel.controller;

import com.xdf.wxbebarrel.model.ExternalTemplateMsg;
import com.xdf.wxbebarrel.utils.JsonResult;
import com.xdf.wxbebarrel.utils.WechatUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/tmpmsg")
public class TmpMsgController {
    @Autowired
    private WechatUtils utils;

    @PostMapping("/w")
    public JsonResult pushTmpMsg(@RequestBody ExternalTemplateMsg record) throws Exception {
        return JsonResult.ok(utils.pushMsgExternalGeneral(record));
    }
}
